package com.niit.house.tgq.price;

import org.apache.hadoop.io.Writable;

import java.io.DataInput;
import java.io.DataOutput;
import java.io.IOException;



public class PriceWritable implements Writable {
    private String ownership;

    private int price;

    public PriceWritable() {
    }

    public PriceWritable(String ownership, int price) {
        this.ownership = ownership;
        this.price = price;
    }

    @Override
    public void write(DataOutput out) throws IOException {
        out.writeUTF(ownership);
        out.writeInt(price);
    }

    @Override
    public void readFields(DataInput in) throws IOException {
        ownership = in.readUTF();
        price = in.readInt();
    }


    public String getOwnership() {
        return ownership;
    }

    public void setOwnership(String ownership) {
        this.ownership = ownership;
    }


    public int getPrice() {
        return price;
    }

    public void setPrice(int price) {
        this.price = price;
    }

}

